package cn.z2huo.demo.model.dataobject.permission;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>该 DO 对应数据库表为 z2huo_permission
 * <p>
 * 
 * @author z2huo
 * @date   2025-06-13
 */
@Data
@NoArgsConstructor
@Accessors(chain = true)
@TableName("z2huo_permission")
public class PermissionDO implements Serializable {

    @Serial
    private static final long serialVersionUID = -2708041070166287744L;

    /**
     * 权限id
     */
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;

    /**
     * 父权限id
     */
    private Long pid;

    /**
     * 权限类型
     */
    private String permissionType;

    /**
     * 权限名称
     */
    private String permissionName;

    /**
     * 权限值
     */
    private String permissionValue;

    /**
     * 排序顺序
     */
    private Integer ranking;

    /**
     * 系统id
     */
    private Long systemId;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime operateTime;
}